package com.zjitc.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.view.InternalResourceView;

/**
 * Create by IntelliJ IDEA
 *
 * @author: jsonor
 * @date-Time: 2018/3/19 16:13
 * @description:
 */
@Controller
public class GetDataController {
  @RequestMapping("/data")
  public ModelAndView handler1(){
    ModelAndView my = new ModelAndView();
    my.setView(new InternalResourceView("/data.jsp"));
    my.addObject("age",10);
    my.addObject("name","Kochiya");
    return my;
  }
}
